<%@ page import="com.uni.entity.User" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri = "http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
  <title>闲优购-</title>
  <link rel="stylesheet" type="text/css" href="css/reset.css">
  <link rel="stylesheet" type="text/css" href="css/main.css">
  <link rel="stylesheet" type="text/css" href="css/ycc.css">
  <link rel="stylesheet" type="text/css" href="bootstrap-5.1.3-dist/css/bootstrap.min.css"/>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css">

  <script type="text/javascript" src="bootstrap-5.1.3-dist/js/bootstrap.min.js"></script>
<body>
    <% User user = (User) session.getAttribute("userInfo"); %>
    <!--首部导航栏-->
    <nav class="container-fluid navbar navbar-dark bg-dark navbar-expand-lg">
      <div class="container-fluid text-white">
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation">
          <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarTogglerDemo02">
          <ul class="navbar-nav me-lg-2 mb-0 mb-lg-1">
            <li class="nav-item">
              <a class="nav-link active" aria-current="page" href="index.jsp"><i class="bi bi-house"></i>首页</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="shop_center.jsp"><i class="bi bi-shop"></i>商品中心</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="#"><i class="bi bi-cart-check"></i>查询订单</a>
            </li>

            <li class="nav-item">

              <a class="nav-link" href="commodity_publish.jsp"><i class="bi bi-shift"></i>发布商品</a>
            </li>

          </ul>
          <form class="d-flex me-auto mx-auto">
            <input class="btn btn-outline-secondary" type="search" placeholder="搜索想要的商品..." aria-label="Search">
            <button class="btn btn-light mx-3 btn-sm" type="submit">
              <i class="bi bi-search"></i>
              搜索
            </button>
          </form>
          <ul class="navbar-nav">

            <li class="nav-item">
              <a class="nav-link" href="#">查询购买记录</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="user_center.jsp">用户中心</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="/loginOut">退出登陆</a>
            </li>

          </ul>

          当前用户: <em id="username"><%=user.getName()%></em>

        </div>
      </div>
    </nav>
</body>
</html>
